var appName = 'YXMES';

Ext.application({
	  name : appName,
	  launch : function() {
		  var extall = Ext.getHead().query('script');
		  if (!Ext.isEmpty(extall)) {
			  var src = extall[0].src.replace("http://", "");
			  this.appFolder = src.substring(src.indexOf("/", 1) + 1, src.indexOf("/",
			      src.indexOf("/") + 1));
		  }
		  Ext.Loader.setPath({
			    'YX' : 'js/yxmes',
			    'YXMES' : 'js/yxmes',
			    'UX' : 'js/ux'
		    });

		  YX.ZbusRpc.init({
			    host : Ext.get("_host").getValue(),
			    topic : Ext.get("_topic").getValue()
		    });

		  //webapp_urlprotocol_startup();

		  /*
		  Ext.Loader.loadScript({
		      url: 'js/yxmes/core/Login.js',
		      onLoad: function () {
		          Ext.create('YX.core.Login');
		      }
		  });*/
		  Ext.require('YX.core.Login', function() {
			    Ext.create('YX.core.Login');
		    });
	  }
  });
